id: task-90 title: Fix task list scrolling behavior - selector should move before scrolling status: Done assignee:
- '@claude' created_date: '2025-06-19' updated_date: '2025-06-19' labels:
- bug
- ui dependencies: []
Description
The task list view currently has incorrect scrolling behavior. When navigating down from the first task, the view scrolls immediately while keeping the cursor on the first item, which feels unnatural. The expected behavior (as seen in the board view) is that the cursor should move down through all visible items first, and only start scrolling when the cursor reaches the bottom of the visible area. This provides a more intuitive navigation experience.
Acceptance Criteria
- [x] Cursor should move down through visible items before scrolling starts
- [x] Scrolling should only begin when cursor reaches the bottom of the visible area
- [x] Scrolling should maintain cursor at bottom while moving through remaining items
- [x] Match the scrolling behavior of the board view
- [x] Test scrolling with lists longer than the visible area
Implementation Plan
- Analyze the board view's scrolling implementation to understand correct behavior
- Compare with current generic list component scrolling behavior
- Modify generic list component to implement proper cursor-before-scroll behavior
- Ensure scrolling starts only when cursor reaches the visible area boundary
- Test with various list sizes to ensure smooth scrolling experience
- Verify the fix doesn't break other uses of generic list component
Implementation Notes
Analysis
The issue was caused by the generic list component using different navigation methods than the board view:
- Board view: Uses
keys: falseandlistBox.select(index)method - Generic list: Was using
keys: trueandlistBox.up()/listBox.down()methods
Solution
Modified the generic list component in /src/ui/components/generic-list.ts:
- Changed navigation methods: Replaced
listBox.up()andlistBox.down()withlistBox.select(current ± 1) - Updated blessed configuration: Set
keys: false,vi: false, andalwaysScroll: falseto match board view - Added arrow key support: Included
["up", "k"]and["down", "j"]in key bindings
Results
- The cursor now moves through visible items before scrolling begins
- Scrolling behavior matches the board view's intuitive navigation
- All existing tests continue to pass
- The fix applies to all uses of the generic list component